/**
 * @author Cator Vee  hi@catorv.com
 */
import { app } from '../'

export default {
  namespace: 'context',
  state: app.context,
  reducers: {
    save (state, action) {
      let newState = {...state, ...action.payload}
      app.updateContext(newState)
      return newState
    },
    fromUpdateContext (state, {payload}) {
      return payload
    }
  }
}
